package com.serkol.ams.controller.api;

import com.serkol.ams.bean.MyPage;
import com.serkol.ams.bean.MyPageOld;
import com.serkol.ams.bean.Result;
import com.serkol.ams.entity.LoginLog;
import com.serkol.ams.service.LoginLogService;
import com.serkol.annotation.IsLogin;
import com.serkol.constant.ResultConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/oauth/system/log")
public class SystemLogApiController {
    @Autowired
    private LoginLogService logService;

    @IsLogin
    @GetMapping("/login")
    public Result login(@RequestParam(name = "pageSize", defaultValue = "10") int pageSize, @RequestParam(name = "current", defaultValue = "0") int current) {


        return logService.findByList(pageSize, current);
    }
}
